---
sidebar_position: 60
description: How to configure an Azure Blob Storage retriever.
---
import { integrations } from "@site/data/integrations";
import {Mandatory, NotMandatory} from "@site/src/components/checks/checks";
export const retrieverName = 'Azure Blob Storage';
export const info = integrations.retrievers.find((r) => r.name === retrieverName)

# Azure Blob Storage

## Overview
{info.longDescription ?? info.description}

## Configure the relay proxy

To configure your relay proxy to use the {retrieverName} retriever, you need to add the following
configuration to your relay proxy configuration file:

```yaml title="goff-proxy.yaml"
# ...
retrievers:
  - kind: azureBlobStorage
    container: my-featureflag-container
    accountName: my-featureflag-account
    object: flag/flags.goff.yaml
# ...
```

| Field name    |    Mandatory     | Type   | Default  | Description                                                                                                        |
|---------------|:----------------:|--------|----------|--------------------------------------------------------------------------------------------------------------------|
| `kind`        |  <Mandatory />   | string | **none** | Value should be **`azureBlobStorage`**.<br/>_This field is mandatory and describes which retriever you are using._ |
| `container`   |  <Mandatory />   | string | **none** | This is the name of your Azure Blob Storage container _(ex: `my-featureflag-container`)_.                          |
| `accountName` |  <Mandatory />   | string | **none** | This is the name of your Azure Blob Storage account.                                                               |
| `object`      |  <Mandatory />   | string | **none** | Location of your configuration file.                                                                               |
| `accountKey`  | <NotMandatory /> | string | **none** | This is the secret key of your Azure Blob Storage account.                                                         |

## Configure the GO Module
To configure your GO module to use the {retrieverName} retriever, you need to add the following
configuration to your `ffclient.Config{}` object:

```go title="example.go"
err := ffclient.Init(ffclient.Config{
    PollingInterval: 3 * time.Second,
    Retriever: &azblobretriever.Retriever{
        Container:    "your-container",
        AccountName:  "your-account-name",
        AccountKey:   "your-account-key",
        Object:       "your_location/feature-flags.json",
    },
})
defer ffclient.Close()
```

| Field             |    Mandatory     | Description                                    |
|-------------------|:----------------:|------------------------------------------------|
| **`Container`**   |  <Mandatory />   | Name of the Azure Blob Storage container       |
| **`Object`**      |  <Mandatory />   | Name of the feature flag file in the container |
| **`AccountName`** |  <Mandatory />   | Azure Storage Account Name                     |
| **`AccountKey`**  | <NotMandatory /> | Storage Account Key                            |
| **`ServiceURL`**  | <NotMandatory /> | Custom service URL                             |

## Error Handling

The `Retrieve` method returns an error if:
- `AccountName` is empty
- `Container` or `Object` is not specified
- There's an issue initializing the Azure client.
- There's a problem downloading or reading the file from Azure Blob Storage.